<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnFileTypeInPostTable extends AbstractMigration
{
    public function up()
    {
        $this->table("post")->addColumn("file_type", 'integer',
            ['limit' => 5, 'default' => 1, 'comment' => '文件类型:1.Word,2.Excel,3.目录']
        )->save();
    }

    public function down()
    {
        $this->table("post")->removeColumn("file_type")->save();
    }
}
